10 research outputs found

    Work Analysis with Resource-Aware Session Types

    Full text link
    While there exist several successful techniques for supporting programmers in deriving static resource bounds for sequential code, analyzing the resource usage of message-passing concurrent processes poses additional challenges. To meet these challenges, this article presents an analysis for statically deriving worst-case bounds on the total work performed by message-passing processes. To decompose interacting processes into components that can be analyzed in isolation, the analysis is based on novel resource-aware session types, which describe protocols and resource contracts for inter-process communication. A key innovation is that both messages and processes carry potential to share and amortize cost while communicating. To symbolically express resource usage in a setting without static data structures and intrinsic sizes, resource contracts describe bounds that are functions of interactions between processes. Resource-aware session types combine standard binary session types and type-based amortized resource analysis in a linear type system. This type system is formulated for a core session-type calculus of the language SILL and proved sound with respect to a multiset-based operational cost semantics that tracks the total number of messages that are exchanged in a system. The effectiveness of the analysis is demonstrated by analyzing standard examples from amortized analysis and the literature on session types and by a comparative performance analysis of different concurrent programs implementing the same interface.Comment: 25 pages, 2 pages of references, 11 pages of appendix, Accepted at LICS 201

    Bounded Expectations: Resource Analysis for Probabilistic Programs

    Full text link
    This paper presents a new static analysis for deriving upper bounds on the expected resource consumption of probabilistic programs. The analysis is fully automatic and derives symbolic bounds that are multivariate polynomials of the inputs. The new technique combines manual state-of-the-art reasoning techniques for probabilistic programs with an effective method for automatic resource-bound analysis of deterministic programs. It can be seen as both, an extension of automatic amortized resource analysis (AARA) to probabilistic programs and an automation of manual reasoning for probabilistic programs that is based on weakest preconditions. As a result, bound inference can be reduced to off-the-shelf LP solving in many cases and automatically-derived bounds can be interactively extended with standard program logics if the automation fails. Building on existing work, the soundness of the analysis is proved with respect to an operational semantics that is based on Markov decision processes. The effectiveness of the technique is demonstrated with a prototype implementation that is used to automatically analyze 39 challenging probabilistic programs and randomized algorithms. Experimental results indicate that the derived constant factors in the bounds are very precise and even optimal for many programs

    A Fistful of Dollars: Formalizing Asymptotic Complexity Claims via Deductive Program Verification

    Get PDF
    Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2018International audienceWe present a framework for simultaneously verifying the functional correctness and the worst-case asymptotic time complexity of higher-order imperative programs. We build on top of Separation Logic with Time Credits, embedded in an interactive proof assistant. We formalize the O notation, which is key to enabling modular specifications and proofs. We cover the subtleties of the multivariate case, where the complexity of a program fragment depends on multiple parameters. We propose a way of integrating complexity bounds into specifications, present lemmas and tactics that support a natural reasoning style, and illustrate their use with a collection of examples

    Compositional certified resource bounds.

    No full text
    Abstract This paper presents a new approach for automatically deriving worstcase resource bounds for C programs. The described technique combines ideas from amortized analysis and abstract interpretation in a unified framework to address four challenges for state-ofthe-art techniques: compositionality, user interaction, generation of proof certificates, and scalability. Compositionality is achieved by incorporating the potential method of amortized analysis. It enables the derivation of global whole-program bounds with local derivation rules by naturally tracking size changes of variables in sequenced loops and function calls. The resource consumption of functions is described abstractly and a function call can be analyzed without access to the function body. User interaction is supported with a new mechanism that clearly separates qualitative and quantitative verification. A user can guide the analysis to derive complex non-linear bounds by using auxiliary variables and assertions. The assertions are separately proved using established qualitative techniques such as abstract interpretation or Hoare logic. Proof certificates are automatically generated from the local derivation rules. A soundness proof of the derivation system with respect to a formal cost semantics guarantees the validity of the certificates. Scalability is attained by an efficient reduction of bound inference to a linear optimization problem that can be solved by off-the-shelf LP solvers. The analysis framework is implemented in the publicly-available tool C 4 B. An experimental evaluation demonstrates the advantages of the new technique with a comparison of C 4 B with existing tools on challenging micro benchmarks and the analysis of more than 2900 lines of C code from the cBench benchmark suite

    The λΠ-calculus Modulo as a Universal Proof Language, in "Second Workshop on Proof Exchange for Theorem Proving (PxTP)", CEUR-WS.org, 2012, vol. 878, Available at: ceur-ws.org/Vol-878/paper2.pdf

    No full text
    The λΠ-calculus forms one of the vertices in Barendregt’s λ-cube and has been used as the core language for a number of logical frameworks. Following earlier extensions of natural deduction [14], Cousineau and Dowek [11] generalize the definitional equality of this well studied calculus to an arbitrary congruence generated by rewrite rules, which allows for more faithful encodings of foreign logics. This paper motivates the resulting language, the λΠ-calculus modulo, as a universal proof language, capable of expressing proofs from many other systems without losing their computational properties. We further show how to very simply and efficiently check proofs from this language. We have implemented this scheme in a proof checker called Dedukti.

    ENVY-FREE TWO-PLAYER m-CAKE AND THREE-PLAYER TWO-CAKE DIVISIONS

    Get PDF
    the study of envy-free cake-cutting problems involving several cakes. The classical result in this area is that when there are q players and one cake, an envy-free cake-division requiring only q − 1 cuts exists under weak and natural assumptions. Among other results, Cloutier, Nyman, and Su showed that when there are two players and two or three cakes it is again possible to find envy-free cake-divisions requiring few cuts, under same assumptions. In the present note, we prove that such a result also exists when there are two players and any number of cakes and when there are three players and two cakes. The proof relies on a theorem by Gyárfás linking the matching number and the fractional matching number in m-partite hypergraphs. hal-00822110, version 1- 14 May 2013 1

    The λΠ-calculus Modulo as a Universal Proof Language

    No full text
    International audienceThe λΠ -calculus forms one of the vertices in Barendregt's -cube and has been used as the core language for a number of logical frameworks. Following earlier extensions of natural deduction, Cousineau and Dowek generalize the de nitional equality of this well studied calculus to an arbitrary congruence generated by rewrite rules, which allows for more faithful encodings of foreign logics. This paper motivates the resulting language, the λΠ -calculus modulo, as a universal proof language, capable of expressing proofs from many other systems without losing their computational properties. We further show how to very simply and e ciently check proofs from this language. We have implemented this scheme in a proof checker called Dedukti

    Dedukti: A Universal Proof Checker

    No full text
    International audiencePrésentation du projet aux journées communes LTP (Langages, Types et Preuves) - LAC (Logique AlgÚbre et Calcul
    corecore